package com.liuweidihuangwan.jingdong.service;

import com.liuweidihuangwan.jingdong.model.dto.address.AddressAddRequest;
import com.liuweidihuangwan.jingdong.model.dto.address.AddressDefaultRequest;
import com.liuweidihuangwan.jingdong.model.dto.address.AddressEditRequest;
import com.liuweidihuangwan.jingdong.model.entity.Address;
import com.baomidou.mybatisplus.extension.service.IService;
import com.liuweidihuangwan.jingdong.model.vo.AddressVO;

import java.util.List;

/**
* @author Administrator
* @description 针对表【address】的数据库操作Service
* @createDate 2025-01-08 11:47:22
*/
public interface AddressService extends IService<Address> {

    /**
     * 添加地址
     * @param addressAddRequest
     * @return
     */
    Integer addAddress(AddressAddRequest addressAddRequest);

    /**
     * 查询地址
     * @return
     */
    List<AddressVO> queryAddressList();

    /**
     * 编辑地址
     * @param addressEditRequest
     * @return
     */
    Integer editAddress(AddressEditRequest addressEditRequest);

    /**
     * 删除地址
     * @param addressId
     * @return
     */
    Integer deleteAddress(Integer addressId);

    /**
     * 将地址设置成默认
     * @param addressDefaultRequest
     * @return
     */
    Integer setDefaultAddress(AddressDefaultRequest addressDefaultRequest);

}
